{ Siberian Olympiad. 2 stage.
  Problemset: http://agul-problems1.googlecode.com/svn/trunk/2010-2011/wso/stage2/wso_2stage.pdf
  Problem 5.
  Points: 26
}
var n:longint;
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(n);
writeln(n*(n-1)+2);
end.